package org.nf.web.common.convertor;

import org.nf.web.common.TypeConvertor;

/**
 * @author zhu
 * @date 2024-05-16
 */
public class CharConvertor implements TypeConvertor {
    @Override
    public Object convert(String requestParam) {
        return requestParam.charAt(0);
    }

    @Override
    public boolean supports(Class<?> type) {
        return (type.equals(Character.class) || type.equals(Character.TYPE));
    }
}
